<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>出库单查询</title>
    <link rel="stylesheet" href="/css/chuku.css" type="text/css"/>
    <script type="text/javascript" src="js/jquery.min.js"></script>
</head>
<body>
出库管理>>出库确认
<hr>
<div class="table" style="color: #505ca0;">
    <table border="0" cellspacing="0" cellpadding="0">
        <form action="chukudanmingxichaxun1.do">


            <tr>
                <td style="width: 10%" ;>出库时间</td>
                <td style="width: 80%" ;>
                    <input type="date" th:value="${session.time1}" id="time1" name="time1">
                    /<input onblur="change()" type="date" th:value="${session.time2}" id="time2" name="time2"><label id="lable"></label>
                </td>
            </tr>
            <tr>
                <td style="width: 10%" ;>出库单号</td>
                <td>
                    <input type="text" id="billId" th:value="${session.billId}" name="billId">
                </td>
            </tr>
            <tr>
                <td style="width: 10%" ;>货主名</td>
                <td>
                    <input type="text" id="custName" th:value="${session.custName}" name="custName">
                </td>
            </tr>
            <tr>
                <td></td>
                <td><input type="submit" id="submit" value="查询" /></td>
            </tr>

        </form>
    </table>
</div>
<div class="table1" style="color: #53a058;">
    <table border="0" cellspacing="0" cellpadding="0" style="background-color: #aedfb6;" th:if="${session.pageInfo3!=null}">
        <tr>
            <td>明细号</td>
            <td>货主</td>
            <td>托盘号</td>
            <td>货物名称</td>
            <td>验货员</td>
            <td>仓管员</td>
            <td>入库数量</td>
        </tr>
        <tr th:each="every:${session.pageInfo3.getList()}">
            <td th:text="${every.get('detailsID')} == null ? 'null' : ${every.get('detailsID')}"></td>
            <td th:text="${every.get('custName')} == null ? 'null' : ${every.get('custName')}"></td>
            <td th:text="${every.get('trayID')} == null ? 'null' : ${every.get('trayID')}"></td>
            <td th:text="${every.get('detailsGoodsName')} == null ? 'null' : ${every.get('detailsGoodsName')}"></td>
            <td th:text="${every.get('detailsAffirmant')} == null ? 'null' : ${every.get('detailsAffirmant')}"></td>
            <td th:text="${every.get('detailsConservator')} == null ? 'null' : ${every.get('detailsConservator')}"></td>
            <td th:text="${every.get('detailsGoodsNum')} == null ? 'null' : ${every.get('detailsGoodsNum')}"></td>
        </tr>
        <button th:value="${session.pageInfo3.getPageNum()>1?session.pageInfo3.getPageNum()-1:session.pageInfo3.getPageNum()}" onclick="lastpage(this.value)">上一页</button>
        <select onchange="pageRows(this.value)" id="select" >
            <option>请选择</option>
            <option value="5"  th:selected="${session.pageInfo3.pageSize == 5}">5</option>
            <option value="10" th:selected="${session.pageInfo3.pageSize == 10}">10</option>
            <option value="15" th:selected="${session.pageInfo3.pageSize == 15}">15</option>
        </select>
        <button th:value="${session.pageInfo3.getPageNum()<session.pageInfo3.getPages()?session.pageInfo3.getPageNum()+1:session.pageInfo3.getPageNum()}" onclick="lastpage(this.value)">下一页</button></tr>
    </table>
</div>
</body>
<script>
    function change() {
        var time1 = $("#time1").val();
        var time2 = $("#time2").val();
        if (time1>time2) {
            $("#lable").html("后面的不能小于前边的时间")
        }
    }
    function pageRows(pageRows){
        var custName = $("#custName").val();
        var billId = $("#billId").val();
        var time1 = $("#time1").val();
        var time2 = $("#time2").val();
        var page = "";
        window.location = "chukudanmingxichaxun1.do?page="+page+"&custName="+custName+"&billId="+billId+"&time1="+time1+"&time2="+time2+"&pageRows="+pageRows;
    }
    function lastpage(page) {
        var custName = $("#custName").val();
        var billId = $("#billId").val();
        var time1 = $("#time1").val();
        var time2 = $("#time2").val();
        var select = $("#select").val();
        window.location = "chukudanmingxichaxun1.do?page="+page+"&custName="+custName+"&billId="+billId+"&time1="+time1+"&time2="+time2+"&pageRows="+select;
    }
</script>
</html>